package cn.sanch.user.service;

import cn.sanch.basic.util.AjaxResult;
import cn.sanch.user.domain.Logininfo;
import cn.sanch.basic.service.IBaseService;
import cn.sanch.user.dto.BinderDto;
import cn.sanch.user.dto.LoginDto;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Sanch
 * @since 2022-06-01
 */
public interface ILogininfoService extends IBaseService<Logininfo> {

    /**
     * 账号登录
     * @param loginDto
     * @return
     */
    Map<String, Object> accountLogin(LoginDto loginDto);

    /**
     * 微信扫码登录
     * @param code
     * @return
     */
    AjaxResult wechatLogin(String code);

    /**
     * 微信扫码登录绑定手机
     * @param binderDto
     * @return
     */
    AjaxResult wechatBinder(BinderDto binderDto);


    /**
     * 退出登录
     * @param token
     */
    void logout(String token);
}
